Handling long-tail content in a content delivery network (CDN)

ABSTRACT

A content delivery network has at least a first tier of servers. A content delivery method includes, at a first server in the first tier of servers, obtaining a request from a client for a resource. If the resource is available at the first server or at a peer of the first server, then the resource is served to the client from the first server. Otherwise, it is determined whether the resource is popular, and if the resource is determined to be popular, then the first server obtains the resource and the first server serves the resource to the client. If the resource is determined not to be popular, the client is directed to a second server, not in the first tier of servers, and the second server serves the resource to the client. The second server may be in a second tier of servers or it may be an origin server.

RELATED APPLICATIONS

This application is a continuation-in-part (CIP) of and claims priorityunder 35 U.S.C. §120 to U.S. patent application Ser. No. 12/408,681,filed Mar. 21, 2009, now U.S. Pat. No. 8,930,538 titled “HandlingLong-tail Content in a Content Delivery Network (CDN), the entirecontents of which are incorporated herein by reference for all purposes.Application Ser. No. 12/408,681 is related to and claims priority under35 U.S.C. §119(e) to U.S. Patent Application No. 61/042,412, filed Apr.4, 2008, titled “Handling Long-tail Content in a Content DeliveryNetwork (CDN),” the entire contents of which are incorporated herein byreference for all purposes.

This application is also related to the following co-owned andco-pending patent applications, the contents of each of which are fullyincorporated herein by reference for all purposes: application Ser. No.10/073,938 filed Feb. 14, 2002, application Ser. No. 11/715,316 filedMar. 8, 2007, application Ser. No. 11/978,656 filed Oct. 30, 2007,application Ser. No. 11/980,672 filed Oct. 31, 2007, application Ser.No. 10/259,497 filed Sep. 30, 2002, application Ser. No. 11/932,162filed Oct. 31, 2007, application Ser. No. 11/976,648 filed Oct. 26,2007, and application Ser. No. 12/390,560 filed Feb. 23, 2009.

FIELD OF THE INVENTION

This invention relates to content delivery, to content delivery networks(CDNs), and to frameworks and systems using CDNs.

DETAILED DESCRIPTION Glossary

As used herein, unless stated otherwise, the following terms orabbreviations have the following meanings:

-   -   1. IP means Internet Protocol.    -   2. “IP address” means an address used in the Internet Protocol        to identify electronic devices such as servers and the like.    -   3. HTTP means Hypertext Transfer Protocol.    -   4. URL means Uniform Resource Locator.    -   5. DNS means Domain Name System.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention can be better understood with reference to thefollowing drawings. The elements of the drawings are not necessarily toscale, emphasis instead being placed upon clearly illustrating theprinciples of the present invention. Furthermore, like referencednumerals designate corresponding parts throughout the several views.

FIG. 1 depicts a general hierarchical, multi-tiered content deliverynetwork (CDN);

FIG. 2 shows the logical organization of servers into groups or clustersin a CDN;

FIG. 3 depicts a content delivery framework (CDF) using a contentdelivery network (CDN);

FIG. 4 depicts the operation of a two-level content delivery network ina content delivery framework;

FIG. 5 is a flowchart showing operation of the popularity services ofthe CDN of FIG. 4;

FIG. 6 is an exemplary data structure for maintaining the popularitydata for a particular popularity server; and

FIG. 7 is a flowchart showing processing steps of a multi-tiered contentdelivery network.

OVERVIEW

The Internet and the so-called World Wide Web (the “WWW”) have becomeubiquitous. Thousands or even tens of thousands of so-called contentproviders (publishers) now use the Internet (and, particularly, the WWW)to provide all sorts of content to tens or even hundreds of thousands ofclients all over the world.

In order to offload the job of serving some or all of their content,many content providers now subscribe to so-called content deliverynetworks (CDNs). Using a CDN, some (or all) of a content provider'scontent can be served to clients from the CDN (i.e., from one or moreservers in the CDN) instead of from the content provider's server(s). Ina caching CDN, content that is served may also be cached on some or allof the CDN servers, either before being served or in response tospecific requests for that content.

The term content as used herein means any kind of data, in any form,regardless of its representation and regardless of what it represents.Content may include, without limitation, static and/or dynamic images,text, audio content, including streamed audio, video content, includingstreamed video, web pages, computer programs, documents, files, and thelike. Some content may be embedded in other content, e.g., using markuplanguages such as HTML and XML. Content includes content which iscreated or formed or composed specifically in response to a particularrequest. The term “resource” is sometimes used herein to refer tocontent.

Certain publishers can have large content libraries in which only asmall proportion of the content (the so-called “short head”) is popularenough to benefit from serving through a caching CDN, while the majorityof the content (the so-called “long tail”) is accessed only occasionallyand not generally worth caching (or even serving from an edge server).This situation would be typical for a content publisher with a verylarge music or video library. Some music content—the popular content—maybe regularly requested, whereas other music—the not popular (alsoreferred to as unpopular) content—may be seldom if ever requested.

Content can become popular (by various measures of popularity) or fadeinto relative obscurity dynamically, so a content library cannot easilybe explicitly partitioned. Instead, the CDN tracks popularity of certaincontent, and selectively migrates content toward the edge (i.e., towardthe tier 1 servers) as that content becomes popular.

A CDN may have one or more tiers of servers, organized hierarchically.FIG. 1 depicts a content delivery network 100 that includes multipletiers of servers. Specifically, the CDN 100 of FIG. 1 shows j tiers ofservers, denoted Tier 1, Tier 2, Tier 3, . . . , Tier j. Each tier ofservers may comprise a number of servers organized into server groups(sometimes referred to as server clusters). The Tier 1 servers are alsoreferred to as edge servers, and Tier 1 is sometimes also referred to asthe “edge” or the “edge of the CDN.” The Tier 2 servers (when present ina CDN) are also referred to as parent servers.

Furthermore, content stored in any of the intermediate tier servers(e.g., tier 2, tier 3, . . . tier j in FIG. 1) may be logicallypartitioned across two or more servers in the respective tier group. Forexample, a first portion (or subset) of a content provider's library maybe stored on a first parent server in Group 1, a second portion may bestored on a second server in Group 1, and the last third may be storedon a third server in Group 1. Various partitioning methodologies aredescribed in further detail below. In operation, the partitioning ofcontent libraries across servers in an intermediate tier of a CDNprovides a type of preemptive load-balancing such that certain parentservers are only responsible for handling a pre-defined subset of acontent provider's library. In other words, redirected requests from theclient to a parent/intermediate tier are distributed within the tier inaccordance with the particular partitioning methodology beingimplemented.

For example, in the CDN 100 of FIG. 1, Tier 1 has n groups of servers(denoted “Edge Server Group 1”, “Edge Server Group 2”, . . . , “EdgeServer Group n”); tier 2 (the parent servers' tier) has m server groups(the i-th group being denoted “Parent Server Group i”); and tier 3 has kserver groups, and so on. Preferably each tier has the same number ofserver groups.

FIG. 2 shows the logical organization/grouping of servers in a CDN ofFIG. 1. In the exemplary CDN of FIG. 2, each tier of servers has thesame number (n) of server groups. Those of skill in the art will knowand understand, upon reading this description, that each server groupmay have the same or a different number of servers. Additionally, thenumber of servers in a server group may vary dynamically. For example,additional servers may be added to a server group to deal with increasedload on the group.

The servers in a server group may be homogenous or heterogeneous, andeach server in a server group may comprise a cluster of physical serverssharing the same name and/or network address. An example of such acluster is described in co-owned patent application No. 61/064,339(titled “Load-balancing cluster”, filed Feb. 28, 2008), the entirecontents of which are incorporated herein by reference for all purposes.

Servers in the same tier and the same group are referred to as peers orpeer servers.

A typical CDN has only one or two tiers of servers. A CDN with only onetier will have only edge servers, whereas a CDN with two tiers will haveedge servers and parent servers. (At a minimum, a CDN should have atleast one tier of servers—the edge servers.)

The grouping of servers in a tier may be based, e.g., on their physicalor geographical location. For example, a particular CDN may have sixgroups—four groups of servers in the United States, group 1 for the WestCoast, group 2 for the mid-west, Group 3 for the northeast and Group 4for the south east; and one group each for Europe and Asia.

A particular CDN server is preferably in only one server group.

In general, some or all of the servers in each tier can exchange datawith some or all of the servers in each other tier. Thus, some or all ofthe parent servers can exchange information with some or all of the edgeservers. For the sake of simplicity, in the drawings, each tier ofservers is shown as being operationally connectable to each other tier.In some CDNs, however, it may be preferable that the servers in aparticular tier can only exchange information with other servers in thesame group (i.e., with peer servers) and/or with other servers in thesame group in a different tier. For example, in some CDNs, the edgeservers in edge server group k, can exchange information with each otherand with all servers in parent server group k, and so on.

A content provider's/customer's server (or servers) are also referred toas origin servers. A content provider's origin servers may be ownedand/or operated by that content provider or they may be servers providedand/or operated by a third party such as a hosting provider. The hostingprovider for a particular content provider may also provide CDN servicesto that content provider.

A CDN may also include a CDN origin/content cache tier which may be usedto cache content from the CDN's subscribers (i.e., from the CDNsubscribers' respective origin servers). Those of skill in the art willknow and understand, upon reading this description, that a CDN cansupport one or more subscribers, i.e., that a CDN can function as ashared infrastructure supporting numerous subscribers. The CDN origintier may also consist of a number of servers, and these servers may alsobe organized (physically and logically) into a number of regions and/orgroups. The server(s) in the CDN origin tier obtain content from thesubscribers' origin servers, either on an as needed basis (a pull) or inadvance (via a push).

A popularity service 102 (described in greater detail below) isassociated with one or more of the server groups in one or more tiers.In a presently preferred exemplary embodiment, some of the parent servergroups have popularity services 102 associated therewith. Although shownas a separate component of the group, the popularity service 102 may beintegrated into one of the servers in the group. In some cases, thepopularity service may have its own server, distinct from any of the CDNservers. The terms “popularity service” and “popularity server” are usedinterchangeable herein.

In operation, when a client requests content that is to be served usinga content delivery framework, the client may be served that content froma server in the CDN or, in some cases, from the subscriber/customer'sorigin server.

A client may be directed to a CDN and/or to a server in the CDN in anymanner using any kind of server selector system 104. As understood bythose of skill in the art, the server selector system 104 generallyoperates to direct a client's requests for content to an appropriateserver in order for that content to be served to the requesting client.An appropriate server may be one which is close to the client (by somemeasure of cost) and/or one which is not too heavily loaded. All sortsof conditions may be applied to the term “appropriate”, and all sorts ofinformation and tests, both static and dynamic, may be used to determinean appropriate server. The server selector system 106 may, e.g., includeor operate fully or partially in Domain Name Service (DNS) servers,standalone devices, or a combination thereof. For example, the serverselector system 106 may comprise a single level DNS server that selectsan appropriate server based at least in part on some combination of thelocation of the requesting client and the load on some or all of the CDNservers. Those of skill in the art will know and understand, uponreading this description, that a client's location in a network such asthe Internet may sometimes only be roughly determined, and the term“location of the client” is generally taken to be a network locationcorresponding to the client's network service provider.

Although shown as a component in the drawings, the server selector 106may comprise numerous components. For example, some or all of the serverselection may be based on anycast routing, and the server selector 106may then include routers and associated tables.

In a presently preferred embodiment the server selector 106 is anintelligent traffic manager (ITM)/adaptive traffic controller (ATC) suchas described in co-pending U.S. patent application Ser. No. 10/259,497,filed Sep. 30, 2002, and titled “Configurable Adaptive Global TrafficControl And Management,” (published as US 2003-0065762 A1); and in U.S.patent application Ser. No. 11/976,648, filed Oct. 26, 2007, titled“Policy-based content delivery network selection,” (collectively the“ITM applications”), the entire contents of each of which have beenincorporated herein by reference for all purposes. In some embodimentsthe server selector 106 may include a “best” or “optimal” serverselector such as disclosed in U.S. Pat. No. 6,185,598 titled, “OptimizedNetwork Resource Location,” the entire contents of which areincorporated herein by reference for all purposes. The '598 patentrefers to CDN servers as so-called repeater servers, and describes aso-called “Best Repeater Selector (BRS) mechanism”.

FIG. 3 shows a content delivery framework 300 with a two-levelhierarchical CDN consisting of a tier of edge servers (Tier 1) and atier of parent servers (Tier 2). Some or all of the edge servers cancommunicate with some or all of the parent servers. The edge servers aredivided into n edge server groups, and the parent servers are dividedinto m parent server groups. In a presently preferred embodiment, thevalue of m is equal to the value of n, i.e., in this presently preferredembodiment there are the same number of edge server groups as there areparent server groups. A CDN origin/content cache tier stores subscribercontent which it obtains from the various subscribers' origin servers.At least one of the parent server groups (in the drawing, Group 1) has apopularity service 102-1 associated therewith. Preferably more than oneparent server group has an associated popularity service, and morepreferably each parent server group has an associated popularityservice.

Although shown in a parent tier, the popularity service may locatedanywhere in the system, including in the edge tier.

The popularity service may be used by certain, though not necessarilyall, content. When only certain content uses the popularity service,content should be designated in order to use the popularity service.

Some or all of the edge servers in a group may use a popularity serviceto manage the long-tail content of various subscribers. Each edge serverthat uses a popularity service is referred to as being bound to thatpopularity service. An edge server that is bound to a popularity serviceis sometimes referred to herein as a “longtail coserver.”

FIGS. 4 and 5 show the operation of the popularity services of the CDNof FIG. 3.

When a client 106 requests content (e.g., using an HTTP GET request),that request is directed (e.g., by server selector 104-1) to an edgeserver in order for the content to be served to the client. For certaindesignated content a popularity check is interposed into the fill sideof the caching operation. FIG. 4 illustrates the flow of messages anddata in the content delivery framework 300, and FIG. 5 is a flowchartshow operation of the popularity services of the CDN of FIG. 4. For thesake of this particular explanation, assume that the client's requesthas been directed to edge server 108. (Those of skill in the art willknow and understand, upon reading this description, that the client'sinitial request may be directed to any tier in the CDN hierarchy,including, e.g., to the parent tier.) This server is selected using theserver selection mechanisms 104-1 associated with the CDN, e.g., usingone or more DNS servers and selecting an edge server based on suchfactors as the location of the requesting client, the load on thenetwork, network traffic conditions, CDN policies, subscriber policies,and the like.

A client 104 requests content from an edge server 108 (at 500 in FIG.5). The request from the client 104 arrives at edge server 108 (S1 inFIG. 4). The edge server 108 checks to see if object is present (locallyor on a peer) and fresh (at 502). If so, the edge server 108 serves theobject to the client 104 from the cache (S2, 504), obtaining the objectfrom a peer, if necessary.

In some embodiments, the system may distinguish between on-net andoff-net peers and same-switch peers. An on-net peer is a peer on thesame backbone network; an off-net peer is a peer located on a differentbackbone network; and a same-switch peer is a peer directly connected tothe same switch as the agent performing the check. In some embodiments,the edge server 108 may only look for the object on some of its peers(e.g., only on same-switch peers) (at 502).

If the object is not available on the edge server 108 or on a peer, theedge server 108 ascertains whether this object is served based on itspopularity (i.e., whether this object has been designated so that theobject's popularity will be used to determine where it will be servedfrom) (at 506). If so, then the request is sent to the popularityservice 102 associated with the edge server 108, in this case, to thepopularity server for the this group (S3 a).

The determination as to whether this object is designated to be servedfrom a different location, depending on its popularity (at 506), may bemade based, at least in part, on the name (hostname) used to request theobject.

It is preferably to allow for a mix of edge servers, some performingpopularity checking (as described above), while others do not. For thosethat are not running the popularity service, the name (hostname) used torequest an object will resolve to a parent server (that may or may notprovide popularity services). If the parent server does not providepopularity services, then the content will be obtained by the edgeserver from that parent server, and the content will be served to theclient. On the other hand, if that parent server does provide popularityservices, it can determine whether or not the edge server is a Longtailcoserver based, e.g., on the IP (Internet Protocol) address of the edgeserver. For no-coservers, the parent server can handle the requestwithout any popularity processing.

A request for content may be an initial request for an object or it maybe a request for another part of an object, the initial part havingalready been served to the client. If the request is for the first partof the object (at 508), e.g., the request includes a request for thefirst byte of the resource (i.e., it is not a range request that startsafter the beginning of the file), the popularity service 102 determines(as described below) if the object is currently popular. First, thepopularity count for the current period is incremented (at 510). Basedon its determination, the popularity service 102 returns one of threepossible responses to the edge server 108 (S3 b):

-   -   1. If the object has not reached a first/minimal level of        popularity (at 512): the popularity service sends the edge        server an instruction (e.g., HTTP 302) to redirect the client's        request to the origin server (or to the CDN origin cache) (if        origin redirects are enabled) (at 514).    -   2. If the object's popularity has exceeded the first/minimal        level of popularity but has not yet exceeded a second, mid-tier        threshold (at 516): the popularity service sends the edge server        an instruction (e.g., HTTP 302) to redirect the client's request        to a parent server (if mid-tier redirects are enabled) (at 518).        Note that the redirect processing may further involve a        determination of which particular parent server is responsible        for storing the requested content. Such a determination would be        based on how the distinct subsets of a content provider's        library are partitioned across parent servers in the same        intermediate tier. Further note that it is also possible for        subsets of a content provider's library to be partitioned across        servers residing in different intermediate tiers of a content        delivery network.    -   3. If the object's popularity has exceeded the mid-tier        threshold (i.e., the object is popular): The popularity service        sends the edge server an instruction to serve the content itself        (at 520). In a presently preferred implementation, the        popularity service sends the edge server a redirect (HTTP 302)        with a “follow me” flag set, to the origin server or, if there        is one, to the parent tier.

If the edge server 108 receives a redirect from the popularity service102 without the “follow me” flag set (cases 1 and 2 above), it simplyforwards the redirect to the client 104 (S4 a, 522, 524). If the edgeserver 108 receives a “follow me” redirect, it obtains and caches theresource (at 526) and serves it to the client (at 528).

If the popularity service 102 is unreachable, unresponsive, or returns astatus code indicating an error (other than HTTP 404), the object isserved out of the edge's cache server (and an alert condition israised).

Once content has been cached at an edge server, the edge server willsend notifications (e.g., in the form of revalidations) to thepopularity service every time it gets another request for that content.E.g., with reference to the flowchart of FIG. 5, if the edge server 108determines (at 502) that it has the requested content (or can obtain itfrom a peer), then, in addition to serving the content (at 504), it alsoinstructs the popularity server to increment the object's popularitycount for the current period (at 530). This process keeps the popularityservers up to date on the relative popularity of content being served intheir region.

In presently preferred embodiments, the server selection mechanism 104does not rendezvous clients to parent servers/caches. In other words, inthese embodiments, client requests are always initially directed by theserver selection mechanism to an edge server. In these cases, when arequest for a resource arrives at a parent server/cache, that requestshould preferably be served (and filled if necessary) unconditionally(since any request from a client is assumed to be the result of aredirect served by an edge server).

In an embodiment where the server selector 104 can direct clientrequests directly to parent servers (or to any tier other than the edgetier), a server obtaining a client request may choose to redirect thatrequest, e.g., based on popularity. However, those of skill in the artwill know and understand, upon reading this description, that it isadvisable to track the redirection of a request to avoid circular and/orinfinite redirection. One way to avoid such a problem is to limit thenumber of levels of redirection (i.e., to limit the number of redirectsto follow). In a presently preferred implementation, if no final serveris selected after following, e.g., thirty two redirects, an error isissued. In some embodiments, if no final sever is selected after apredefined number of redirects, then the last server reached may be usedto serve the content. One way to prevent looping is to use differentserver names (aliases) or IP addresses when redirecting requests so thata server receiving a request can tell whether or not it is a redirect.Those of skill in the art will know and understand, upon reading thisdescription, that information can be transferred between servers using,e.g., HTTP headers or the like.

Those of skill in the art will know and understand, upon reading thisdescription, that in a multi-tier CDN, the popularity service may belocated at any tier, or there may be popularity services at more thanone tier.

The middle (Parent) tier is optional.

Step (4 a) may reply with content (if popular), or with a redirect to aparent or origin server (if not), in which the client will make anotherrequest (5 a or 5 b) to that tier to obtain the content.

If the request is an HTTP GET request or the like, it is forwarded tothe popularity service. HTTP POST requests should always be forwardeddirectly to the origin, since that is where they will need to beprocessed, and the response to a POST request should not be cached. Itmay sometimes be preferable to direct GET requests to a different originserver than POST requests.

While the invention has been described with reference to the HTTPprotocol, those of skill in the art will know and understand, uponreading this description, that different and/or other protocols may beused and are contemplated by the inventors. HTTP is described in variousdocuments, e.g., Hypertext Transfer Protocol—HTTP/1.1, RFC 2616, NetworkWorking Group, the entire contents of which are incorporated herein byreference.

Those of skill in the art will know and understand, upon reading thisdescription, that different thresholds may be established for each tierin the CDN. Further, those of skill in the art will know and understand,upon reading this description, that each content item may have its ownthresholds associated therewith. In this manner, the system can checkall content for popularity, with the default thresholds being zero. Inthis manner, every request will automatically cause the popularity toexceed the threshold and will cause the content to be cached.

By positioning Popularity Servers regionally (paired with parent cacheservers), popularity and cache tiers can be managed independently, on aregional basis. Content that is popular in one region/group may not bepopular in another region/group (especially if each region/groupcorresponds to a geographic and/or political region).

We consider it desirable that rendezvous to popularity serversprioritize so-called “regional” proximity, so that clients within thesame region will tend to cast their popularity “votes” within thatregion and get consistent treatment of popular resources. However, ifthere are multiple parent cache servers available, there will generallybe no attempt to rendezvous particular clients to particular parents.

Defining & Measuring Popularity

In preferred embodiments, popularity of an object/resource is measuredbased on the number of times that object/resource is requested invarious time periods. FIG. 6 is an exemplary data structure formaintaining the popularity data for a particular popularity server. Thedata structure 600 in FIG. 6 is a so-called tally hash structure.

In preferred embodiments, some or all edge servers are associated with(or bound to) popularity servers. An edge server that is bound to apopularity server is sometimes referred to as a bound Longtail coserver.Each popularity server in the system allocates a tally hash structure800 per bound Longtail coserver. A configuration provides the number ofresource (hash) slots to allocate. For a presently preferredimplementation, the number of hash slots is on the order of 100 millionslots per coserver. Each slot is divided into a number of time buckets,preferably 16 time buckets, each bucket being represented by, e.g., a4-bit unsigned integer. Those of skill in the art will know andunderstand, upon reading this description, that the selection of thesize of the value in each time bucket depends on policy decisions aboutbounds for the popularity thresholds, and for keeping very popularresources at the edge. The size, however, is heavily influenced by aneed for compactness. One 8-byte word can store all time buckets for oneresource slot, and therefore, 800 MB would be required per property, andfive to eight such properties could be managed per popularity serverwithout paging.

Each time bucket represents a time period, preferably a number ofseconds.

The mapping of requests/content to slots is based on some function ofthe object name and perhaps other information associated with therequest for the object. Preferably the mapping of objects to slots isbased on a hash or message digest function (such as MAD or the like)over the object name (and preferably including some parts of the querystring). Each slot may therefore represent one or more resources. Eachtime a query/request arrives at a popularity server for an object, thehash is computed and the slot in the table 800 (for the appropriateco-server) is determined, and the counts in that slot are used. In eventof a hash collision, it is therefore possible that one bucket will bereceiving and representing counts for more than one object. Since thisresult is generally undesirable (since it could result in cache fillsand edge caching of unpopular objects), the number of buckets should bechosen to be as large as practical.

Those of skill in the art will know and understand, upon reading thisdescription, that different and/or other data structures may be used toimplement the popularity counting. For example, since in most cases thetotal number of resources is expected to far exceed the number ofpopular resources, a balanced b-tree may be preferable to a hash table.In addition, it is possible to reduce the size of the hash slot by usingonly some part of the hash. However, reducing the number of bytes of thehash used can result in more name collisions.

Although described above with respect to popularity, those of skill inthe art will know and understand, upon reading this description, thatother factors may be used along with (or instead of) popularity todetermine whether or not to redirect requests. A rule base may be usedto augment and/or override the popularity measures for certainresources. The rules in the rule base may be static or dynamic and maybe set by the CDN administrator and/or the subscriber. For example, asubscriber may not want to pay for certain content to be served from theedge, regardless of its popularity, and may set a rule accordingly (thisparticular result could also be achieved by setting the thresholds forthat particular content to prevent it from ever being cached at theedge).

Occasional log mining could be used to look for hash collisions inactual subscriber content libraries, and the hash function and bucketsizes could be tuned as needed.

At each time bucket boundary, the popularity service will logically“rotate” the buckets and zero out the oldest tally data for each object.

Whenever a coserver's enrollment in the popularity service changes(added or dropped, or perhaps hints changed), the data structures are tobe updated.

The popularity of a given object may be determined as a weighted sum ofits popularity over successive time periods. More recent time periodsmay be given higher weights.

In order to determine which content is to be managed by the popularityservice, the CDN operator and/or the subscriber may specify:

-   -   The tiers at which the content will be managed—edge,        intermediate (i.e., parent), or origin (subscriber's or storage        tier). In order to be meaningful, at least one of intermediate        and origin service should be enabled.    -   content that is to be managed based on its popularity, rather        than simply always being served from a cache.

There are several reasons why a publisher/subscriber may not want theso-called “long-tail” content served from a caching CDN service, forexample:

-   -   If cache fills are done from the subscriber's origin server and        the subscriber pays for cache fill bandwidth, unnecessary fills        for unpopular resources increase bandwidth costs without        providing any value.    -   Serving an unpopular resource through a CDN cache adds latency        (due to the cache fill), and risks forcing actually popular        resources out of cache, potentially causing thrashing. The        result is lower efficiency and the risk of degraded service.

For related or similar reasons, a CDN provider generally also does notwant to serve long-tail content from an edge cache:

-   -   If cache fills are done from origin storage, unnecessary cache        fills consume bandwidth both from the storage and cache systems,        increasing (doubling) the internal cost to serve. This lowers        efficiency, requiring relatively more bandwidth internally to        serve the same content to the outside.    -   The second argument above also applies from the CDN's        perspective: a CDN operator wants to minimize latency as well as        the risk of thrashing in order to satisfy all of its        subscribers.        Names, Addresses & Configuration Data

As is well known, each server in a network may be addressed by means ofone or more network address (e.g., Internet Protocol or IP addresses).Each server in a network may also be known by one or more names(so-called hostnames—fully qualified domain names). Hostnames may bemapped to one or more IP addresses. A hostname may correspond to (andthus resolve to) more than one server.

A system such as ITM (described in the ITM patent applications mentionedabove), allows a kind of hostname (called a supername) to refer tomultiple servers, and resolves the supername to a nearby server.

Preferably the server selection mechanism is ITM, and each popularityserver will have supername that resolves to reach nearby popularityserver.

When a popularity server shares or is co-located with a parent server,the parent server may use the name by which it was addressed todetermine whether to direct a request to the popularity service. Thatis, parent cache servers that provide popularity service may recognizerequests that use one of the aliases reserved for popularity requests,and call into the popularity service to make the fill/no fill decisionand return a redirect as described above.

As noted earlier, if the server selector mechanism does not send initialrequests to non-edge servers, then all parent cache servers mustrecognize requests that have been redirected and serve the requestedresource, filling it from the origin (or another tier), if necessary.

A servers hostnames are also referred to as its aliases. Each Longtailcoserver preferably has at least two aliases (three if a parentcache/server tier is used): the published supername, the hostname usedfor popularity service requests, and (if used) the hostname used forparent cache redirects.

Popularity servers will preferably be reached via an ITM supername, andITM will monitor for the service's availability across the set ofservers. Popularity servers should be reached using real IP addresses,and not virtual IPs, and will not necessarily be redundant within acluster. Redundancy can be provided by having multiple servers persupername. However, preferably there will be no attempt to synchronizethe popularity tallies on popularity servers, with the expecteddesirable effect of managing popularity separately on a “regional”basis, the granularity being determined by the number and distributionof popularity servers deployed. Should a popularity server fail, thiscould cause a discontinuity in popularity responses as a new serverbecomes active for a given edge location, but this may be mitigated (forvery popular resources) by periodic background refreshes.

Information about the resources and caching strategy include thefollowing:

-   -   the expected total number of resources associated with this        coserver.    -   the number of buckets used to store hit counts for each        resource.    -   the number of seconds that each bucket represents. Every time        this interval goes by, the count in the oldest bucket is thrown        out and a new bucket is started with a count of zero.    -   when the sum of all buckets for a given resource reaches this        number on any popularity server, the parent caches (if any) that        use that server will start to cache the resource.    -   when the sum of all buckets for a given resource reaches this        number on any popularity server, the edge caches that use that        server will start to cache the resource.    -   the hash algorithm to apply to the resource names (optional). If        not specified, a default algorithm (e.g. MD5) will be used.    -   the maximum number of this coserver's resources that should be        in cache at an edge at any given time. This value may be ignored        in certain embodiments.    -   the maximum number of this coserver's resources that should be        in cache at a parent at any given time. This value may be        ignored in certain embodiments.

Preferably resources should not be pre-expired on parent cache servers,as that will cause unnecessary requests to the origin server or queriesto peer caches.

Those of skill in the art will know and understand, upon reading thisdescription, that a decision to serve at a given tier that is based onlyon popularity counts, will not take into account capacity to serve atthat tier—so this scheme could overload an origin server or parent tierif they do not have sufficient capacity. Further, if popularity ismeasured in terms of absolute thresholds on numbers of requests, and ifthe library is sufficiently large, this could cause cache thrashing atthe parent or edge tiers.

Authentication with the origin cache or server, if needed, should bedone by the server that receives the initial request from the client.During processing of a redirected request.

Various documents, including patents and patent applications, have beenincorporated by reference into this application. In case of any conflictbetween an incorporated document and the present application, thepresent application, including any definitions herein, will control.

Thus is provided a feature that allows a CDN to be responsive toincreasing or decreasing “popularity” of content by shaping where in theCDN content is positioned and served from.

FIG. 7 is a flowchart 700 of processing steps associated with amulti-tiered content delivery network.

In step 705, a first server in a first tier of servers obtains a requestfrom a client for a resource. In one embodiment, the resource isavailable as part of a content provider's library (e.g., the resourcemay be a digital movie requested from an on-line streaming movieprovider).

In step 710, if the resource is not available at the first server or ata peer of the first server, and additionally if it is determined thatthe resource is popular (using processing and functionality previouslydescribed), then the first server obtains the resource and serves it tothe client. For example, the first server may obtain the resource froman origin server and/or a parent server (in any intermediate tierbetween the first server and the origin server).

In step 715, if the resource is determined not to be popular (again,using processing and functionality previously described), the client isdirected to a second server in a second tier of servers (e.g., anyintermediate tier) distinct from the first tier of servers. In thisexample embodiment, the second server comprises a first portion (orsubset) of the content provider's library. For the purposes of thisexample, the first portion comprises at least the resource that wasrequested by the client. Furthermore, the second tier includes at leastone other server that comprises a second portion of the contentprovider's library. According to one example embodiment, the firstportion is distinct from the second portion (i.e., the portions/subsetsof the library do not overlap, or overlap only minimally).

In another example embodiment, the portions of the content provider'slibrary are logically partitioned across servers in the second tier. Forexample, the portions/subsets of a content provider's library can bepartitioned alphabetically across servers in the second tier based on anaming convention associated with each distinct resource in the contentprovider's library (e.g., digital movies having titles beginning withA-F are stored on server A in a second/intermediate tier, digital movieshaving titles beginning with G-R are stored on server B in thesecond/intermediate tier, and digital movies having titles beginningwith S-Z are stored on server C in the second/intermediate tier).

Assume, for example, that a content provider's library comprisesmultiple content-types (e.g., movies, video games, music, softwarepatches, etc.). Per one example embodiment, it would be advantageous tostore a proportionate amount of each content type on each participatingintermediate tier server (e.g., 60% movies, 30% video games, 10%software downloads on each participating server in the tier). In such ascenario, if the demand for a particular content-type increases during agiven time period (and/or demand for a different content-type declines),then such fluctuations in demand will generally affect eachparticipating server proportionately.

Noted that resources may be partitioned across multiple servers bynaming convention (e.g., alphabetically) as well as havingproportionally distributed content per server (e.g., by content-type).With this in mind, it should be further noted that logical partitioningof resources/content among intermediate servers is not limited to justalphabetic naming convention segmentation and/or content-typeproportionality. It is contemplated that the partitioning may be basedon various metrics such as, but not limited to, numeric hash values(e.g., MD5) associated with content/resource URLs, the size or file typeof a resource, other identifiers associated with other various namingconventions (e.g., numerical, alphanumerical, proprietary,encrypted/mangled, etc.), the relative size and traffic behavior ofvarious resources in a content provider's library or the contentprovider's library as a whole, and the like.

In step 720, the step of directing the client to a second server in thesecond tier is performed in response to a determination of which secondserver actually stores the first portion. In one example, the serverthat stores the first portion (or, for that matter, any portion thatcomprises the requested resource) is identified using a hash function(similar to the processing and functionality previously described).

In step 725, the second server that stores the first portion serves theresource to the client.

The foregoing description has been presented for purposes ofillustration and description. It is not intended to be exhaustive or tolimit the invention to the precise forms disclosed. Obviousmodifications or variations are possible in light of the aboveteachings. The embodiment or embodiments discussed were chosen anddescribed to provide the best illustration of the principles of theinvention and its practical application to thereby enable one ofordinary skill in the art to utilize the invention in variousembodiments and with various modifications as are suited to theparticular use contemplated. All such modifications and variations arewithin the scope of the invention as determined by the appended claimswhen interpreted in accordance with the breadth to which they are fairlyand legally entitled.

We claim:
 1. A method of content delivery in a content delivery networkcomprising at least a first tier of servers, the method comprising: at afirst server in the first tier of servers, obtaining a request from aclient for a resource, wherein the resource is available as part of acontent provider's library; if the resource is not available at thefirst server or at a peer of the first server, determining if theresource is popular; if the resource is determined to be popular, thenthe first server obtaining the resource and the first server serving theresource to the client, otherwise, if the resource is determined not tobe popular, directing the client to a second server in a second tier ofservers distinct from the first tier of servers, wherein the secondserver comprises a first portion of the content provider's library, thefirst portion comprising at least the resource, wherein at least oneother server in the second tier comprises a second portion of thecontent provider's library, wherein the first portion of the contentprovider's library is distinct from the second portion, and wherein thesecond tier is any intermediate tier between the first tier and anorigin server that stores resources associated with the contentprovider's library, and the second server serving the resource to theclient.
 2. A method as recited in claim 1, wherein portions of thecontent provider's library are logically partitioned across servers inthe second tier.
 3. A method as recited in claim 1, wherein the firstportion and the second portion are alphabetically partitioned acrossservers in the second tier based on a naming convention associated witheach distinct resource in the content provider's library.
 4. A method asrecited in claim 1, wherein the content provider's library comprises aplurality of content-types, each resource in the library beingassociated with one of the plurality of content-types.
 5. A method asrecited in claim 4 further comprising storing distinct portions of thecontent provider's library on two or more servers in the second tier,wherein the content-types on each of the two or more servers areproportionally distributed, the content-types comprising at least one ofaudio content, video content, gaming content, and software content.
 6. Amethod as recited in claim 1, wherein resources of the contentprovider's library are distributed in a substantially equal manneracross servers in the second tier based on hash values of uniformresource locators (URLs) associated with two or more respectiveresources in the content provider's library.
 7. A method as recited inclaim 1, wherein the step of directing the client to a second server ina second tier is performed in response to a step of using a hash todetermine which second server in the second tier stores the firstportion of the content provider's library.
 8. A method as recited inclaim 1 wherein the step of determining whether the resource is popularcomprises determining whether a current popularity value for theresource exceeds a popularity threshold.
 9. A method as recited in claim8, wherein the first tier of servers comprises a first popularitythreshold and the second tier of servers comprises a second popularitythreshold, and wherein the first popularity threshold is different fromthe second popularity threshold.
 10. A content delivery frameworkcomprising: a plurality of edge servers forming a first tier of servers;a plurality of parent servers forming a second tier of servers, theparent servers being distinct from the edge servers; and at least onepopularity service constructed and adapted to obtain a first set ofinformation from at least some of the edge servers about requests forcontent, and to provide the edge servers with a second set ofinformation about which tier of servers should handle those requests forcontent, the popularity service making its determinations based, atleast in part, on a measure of popularity of requested content; andwherein the requested content is available as part of a contentprovider's library, and wherein distinct portions of the contentprovider's library are logically partitioned across parent servers inthe second tier.
 11. A content delivery framework as recited in claim10, wherein at least one of the parent servers in the second tiercomprises a first logically partitioned portion of the contentprovider's library, the first logically partitioned portion comprisingat least the requested content.
 12. A content delivery framework asrecited in claim 11, wherein at least one other parent server in thesecond tier comprises a second logically partitioned portion of thecontent provider's library, the second logically partitioned portionbeing distinct from the first logically partitioned portion.
 13. Acontent delivery framework as recited in claim 10, wherein the secondset of information further includes identification of a parent server inthe second tier that stores a logically partitioned portion of thecontent provider's library comprising the requested content.
 14. Acontent delivery framework as recited in claim 10, wherein the secondtier of parent servers is any intermediate tier between the first tierand an origin server that stores the content provider's library.
 15. Amethod of content delivery in a content delivery network comprising aplurality of tiers of servers, including at least a first tier ofservers and a second tier of servers, the method comprising: at a firstserver in one tier of the tiers of servers, obtaining a request from aclient for a resource, wherein the resource is available as part of acontent provider's library; if the resource is not available at thefirst server or at a peer of the first server, then selectivelyredirecting the request from the client to a second tier server, thesecond tier server being in a tier distinct from the tier containing thefirst server, the redirecting being based, at least in part, on acurrent popularity value for the resource; wherein the second tierserver comprises a first portion of the content provider's library, thefirst portion comprising at least the resource, wherein at least oneother second tier server comprises a second portion of the contentprovider's library distinct from the first portion, and wherein thesecond tier of servers is any intermediate tier between the first tierand an origin server that stores the content provider's library, andwherein the step of selectively redirecting the request from the clientto a second tier server comprises determining to which second tierserver the request should be directed, the determining step using a hashfunction to identify a second tier server that stores the first portionof the content provider's library.
 16. A method as recited in claim 15wherein the first tier of servers comprises a plurality of edge serversand the second tier of servers comprises a plurality of parent servers,and wherein the first server is a parent server in the second tier andthe second server is an edge server in the first tier.
 17. A method asrecited in claim 15 wherein the first tier of servers comprises aplurality of edge servers and the second tier of servers comprises aplurality of parent servers, and wherein the first server is an edgeserver in the first tier and the second server is a parent server in thesecond tier.
 18. A method as recited in claim 15 wherein the first tierof servers comprises a plurality of edge servers and the second tier ofservers comprises a plurality of parent servers, and wherein theplurality of tiers of servers further comprises an origin tier, andwherein the first server is a parent server in the second tier and thesecond server is a server in the origin tier.